builder.component(){    
    current.clients.add(protocol.FILE)
    current.clients.add(protocol.HTTP)
    current.clients.add(protocol.HTTPS)
    current.clients.add(protocol.CLAP)
    
    application(uri:noteApp){
        router{
            //resource of note collection
            //type indicating the representation type.
            resource(uri:"/notes.{type}", ofBean:"notesResources")              
            // create a new note this resource only accpets POST method
            resource(uri:"/note", ofBean:"noteResource")
            // get a representation of note, 
            // user must explicitly specify the content type
            resource(uri:"/note/{noteid}.{type}",ofBean:"noteResource")
            //store and delete note
            resource(uri:"/note/{noteid}",ofBean:"noteResource")
            // note outline
            resource(uri:"/note/{noteid}/outline.{type}", 
                    ofBean:"noteOutlineResource")
        }
    }
}